library identifier: 'library@master', retriever: modernSCM([
        $class: 'GitSCMSource',
        remote: 'https://gitee.com/jandan5910/jenkins-share-library',
        traits: [[$class: 'jenkins.plugins.git.traits.BranchDiscoveryTrait']]
])

// 全局配置Library
//@Library('library') _
//@Library('library@test') _

pipeline {
    agent any

    stages {
        stage('Maven Fake') {
            steps {
                script {
                    mvn.fake()
                }
            }
        }

        stage('Gradle Fake') {
            steps {
                script {
                    gradle.fake()
                }
            }
        }
    }

    post {
        always {
            cleanWs cleanWhenFailure: false, cleanWhenNotBuilt: false, cleanWhenUnstable: false
        }
        failure {
            echo "build failure"
        }
    }

}